{% extends 'base.html' %}

{% block content %}
<h1>{% block title %} use the templates {% endblock %} </h1>

{% for post in posts %}
<a href="{{url_for('post',post_id=post['id'])}}">
    <h2>{{post['title']}}</h2>
</a>
<a href="{{url_for('edit', post_id=post['id'])}}">
    <span class="badge badge-warning">编辑</span>
</a>
<span class="badge badge-primary">{{ post['created']}}</span>
<hr>
{% endfor %}
{% endblock %}